<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        laydate.render({
            elem: '#laytimes',
            range: '---',
            min: '2000-1-1',
            max: 0,
            theme: '#393D49',
        });
    });
</script>
{load href="__ADMIN__/hack/Blob.js,__ADMIN__/hack/FileSaver.js,__ADMIN__/hack/tableExport.js" /}
<script>
    function allcsv(o) {
        var s = $(o).data();
        var mydate = new Date();
        tableExport(s.cid, mydate.toLocaleDateString(), s.type);
    }
    function closcsv(o) {
        var s = $(o).data();
        var tds = $("#"+s.cid).find("td input:checkbox:checked");
        var mydate = new Date();
        $("#xue tbody").empty();
        tds.each(function () {
            var trs = $(this).closest("tr");
            $("#xue tbody").append(trs.clone(true));
        })
        tableExport("xue",mydate.toLocaleDateString(), s.type);
    }
</script>
<script>
    $("#all").click(function () {
        $(this).closest("table").find("td.alltd input:checkbox").prop("checked",$(this).prop("checked"))
    })
</script>
